a) Field of the Invention
The present invention relates to a method of measuring a subject distance, and more particularly to a phase difference detection type rangefinder for measuring a subject distance to detect a camera focus point and the like.
b) Description of the Related Art
FIGS. 13A and 13B show an example of a rangefinder of a TTL (through-the-lens) and phase difference detection type according to a conventional technique. FIG. 13A shows an example of the structure of the rangefinder, and FIG. 13B shows an example of a processor circuit of the rangefinder. The rangefinder used as a camera focus point detector will be described by way of example.
Light from a subject to be photographed is converged by a taking lens 51, passes through a film equivalent plane 52, and transmits to a condenser lens 53 and a separator lens 54. The separator lens 54 separates the incident light into two light beams which are focussed onto a base line sensor 55 and a reference line sensor 56. The separator lens 54 separates an image of the subject on an optical axis 58 of the taking lens 51 into two images which are focussed onto the line sensors 55 and 56.
The line sensor 55 has p light receiving elements and is called a base line sensor because this sensor is used as a basis for rangefinding. The line sensor 56 called a reference line sensor has q light receiving elements more than p elements. Signals are read from p light receiving elements among the q elements while changing the phase of reading the signals, and compared with corresponding signals read from the base line sensor 55.
Signals detected by the base and reference line sensors 55 and 56 are supplied to a processor circuit 57. The processor circuit 57 calculates correlation factors to be described later, to thereby obtain a correlation extreme and detect an in-focus point while changing the phase of reading signals from the reference line sensor 56.
FIG. 13B shows an example of the structure of the processor circuit 57. Signals from the base and reference line sensors 55 and 56 are supplied to an A/D converter 59 which converts the analog signals into digital signals. The digital signals are temporarily stored in a RAM 61 under the operation of a CPU 60. The digital signals are then read from RAM 61, and CPU 60 performs correlation factor calculations to detect an extreme of correlation factors and generate an output signal representing a distance to a subject.
In the focus point detector shown in FIGS. 13A and 13B, charges accumulated in the photosensors are directly charge-voltage converted. The detected signals are converted into digital signals and stored in RAM 61. The digital signals are thereafter read to perform correlation factor calculations.
The present applicant has proposed a focus point detector in which charges accumulated upon application of light are non-destructively read and they are used in the form of analog signals for correlation factor calculations. FIG. 14A shows an example of the structure of a photosensor of such a focus point detector. The photosensor is constructed by forming a p-type well 66 on the surface of an n.sup.- -type silicon substrate 64 and by forming an n.sup.+ -type region 68 partially in the p-type well 66 to form a p-n junction 69. When light is incident to the neighborhood of the p-n junction 69, electron/hole pairs are generated and they are separated into electrons and holes and stored in accordance with the potential gradient around the p-n junction.
The p-type well 66 extends further to the left region of the p-n junction 69. On this left region, insulated polysilicon gate electrodes 71 to 74 and an insulated floating gate electrode 76 are formed. Next to the photodiode, a barrier region 81 with the gate electrode 71 is formed. Next to the barrier region 81, a storage region 82 with the gate electrode 72 is formed. Charges corresponding to incident light to the photosensor are transferred near from the p-n junction 69 to the storage region 82, via the barrier region 81, and accumulated in the storage region 82. The storage region 82 is contiguous with a shift register region 84 having the gate electrode 74 via a barrier region 83 under the transfer gate electrode 73. The shift register region 84 is contiguous with a read region 86 under the floating gate electrode 76 having a bias applying aluminum electrode 75 formed above the gate electrode 76.
Electron/hole pairs are generated in response to incident light to the photodiode, and carriers pass over the barrier region 81 and are accumulated in the storage region 82 under the gate electrode 72, and further pass over the potential barrier region 83 under the transfer gate electrode 73 and are transferred to the shift register region 84 under the gate electrode 74. Charges accumulated in the shift register region 84 are transferred to the read region 86 under the floating gate electrode 76 in accordance with a voltage applied to the gate electrode 75. Charges corresponding to the transferred charges are induced in the floating gate electrode 76, and an incident light amount is non-destructively read in accordance with the amount of the induced charges. After reading the incident light amount, carriers are again transferred and shifted in the shift register region 84. In this manner, charges in the shift register region 84 are sequentially and non-destructively read.
If the photosensor shown in FIG. 14A is used, calculations of the following equation (1) can be performed by using a switched capacitor integrator and by using detected signals in the form of analog signals. EQU H(m)=.SIGMA.(k=1-p) .vertline.B(k)-R(k+m).vertline.. . . (1)
FIG. 14B shows an example of a switched capacitor integrator.
A charge signal B(k) from a base photosensor and a charge signal R(k) from a reference photosensor are applied to input terminals Pb and Pr of the switched capacitor integrator, respectively, and applied via amplifiers to inverting and non-inverting terminals of a differential amplifier 88. The differential amplifier 88 generates a sign signal Sgn in accordance with whether the input signal B(k) is larger than the input signal R(k) or not, and supplies it to a channel select circuit 89. The channel select circuit 89 generates a pair of complementary signals .PHI.1 and .PHI.2 and another pair of complementary signals KA and KB, the phases of these signals being inverted in response to the sign signal Sgn.
The input terminal Pr is connected via the amplifier and a switch 90 controlled by the select signal KB to a capacitor CS1 both terminals of which are grounded via switches 93 and 94 controlled by the select signal KA and .PHI.1. The terminal of the capacitor CS1 on the switch 94 side is connected via a switch 91 controlled by the select signal .PHI.2 to the inverting input terminal of an operational amplifier 92.
Similarly, the input terminal Pb is connected via the amplifier and a switch 95 controlled by the select signal KA to a capacitor CS2 both terminals of which are grounded via switches 97 and 98, controlled by the select signal KB and .PHI.1. The terminal of the capacitor CS2 on the switch 98 side is connected via a switch 92 controlled by the select signal to the inverting input terminal of the operational amplifier 92.
The non-inverting terminal of the operational amplifier 92 is grounded. A signal at the output terminal 99 of the operational amplifier 92 is fed back to the inverting input terminal via a parallel circuit of a capacitor C1 and a switch 87 controlled by a select signal .PHI..sub.RST. Neither the select signals KA and KB nor the select signals .PHI.1 and .PHI.2 take a high level at the same time.
When the select signals KB and .PHI.1 take the high level, the switches 90, 94, 97, and 98 are closed so that the signal R(k) is charged in the capacitor CS1. Both the terminals of the capacitor CS2 are grounded and the charge in the capacitor CS2 is discharged.
Next, when the select signals KA and .PHI.2 take the high level, the switches 91, 93, 95, and 96 are closed so that the left terminal of the capacitor CS1 is grounded and the right terminal thereof is connected to the inverting terminal of the operational amplifier 92. As a result, the potential of the signal R(k) is inverted in effect. The capacitor CS2 is connected via the switches 95 and 96 across the input terminal Pb and the inverting input terminal of the operational amplifier 92 so that the signal B(k) is charged in the capacitor CS2. Therefore, a difference between the signals R(k) and B(k) is applied to the inverting input terminal of the operational amplifier 92.
When the relationship of amplitude of the signals R(k) and B(k) is reversed, the channel select circuit 89 inverts the phase relationship between the select signals KA and KB and between the select signals .PHI.1 and .PHI.2 in accordance with the sign signal Sgn. In this case, the signal B(k) is charged in the capacitor CS2 and the inverted signal is applied to the inverting input terminal of the operational amplifier 92. The signal R(k) is applied via the capacitor CS1 to the inverting input terminal of the operational amplifier 92.
The inverting input terminal of the operational amplifier 92 is therefore always supplied with a signal corresponding to an absolute value of a difference between the signals B(k) and R(k). Absolute values of differences between base signals and corresponding reference signals are detected in this manner and added together to calculate a correlation factor H. The phase difference and focus point can be detected by referring to the correlation factor H.
Detecting a phase difference through correlation factor calculations will be detailed with reference to FIGS. 15A, 15B, and 15C.
As shown in FIG. 15A, an image of a subject is focussed on a base line sensor by a base line sensor lens. The subject image is also focussed on a reference line sensory by a reference line sensor lens. The base line sensor and reference line sensor are spaced apart by a base length in the horizontal direction.
If a subject is at a predetermined position, the same image is focussed on corresponding light receiving elements of the base and reference line sensors 55 and 56. If the subject is at a position different from the predetermined position, images on the base and reference line sensors 55 and 56 are displaced in the horizontal direction. If the subject is at a near position, the distance between images becomes long, whereas if the subject is at a far position, the distance between images becomes short. In order to detect a change in the distance between images, the number of elements of the reference line sensor 56 is set greater than the reference line sensor 55.
A phase difference detecting scheme using correlation factor calculations is used for detecting a change in the distance between images.
In the phase detection through correlation factor calculations, an in-focus state is judged from a relative displacement value (phase difference) which provides a minimum correlation factor between a pair of images projected on the line sensors 55 and 56. The correlation factor is calculated from the equation (1). EQU H(m)=.SIGMA.(k=1-n).vertline.B(k)-R(k+m).vertline.. . . (1)
where .SIGMA.(k=1-n) represents a sum of the correlation function for k=1 to n, k represents a reference element of the line sensor 55, and m represents a relative displacement amount and is an integer, for example, from -6 to 6.
The signal B(k) is a time sequential electrical signal outputted from each pixel of the base line sensor 55, and the signal R(k+m) is a time sequential electrical signal outputted from each pixel of the reference line sensor 56. By sequentially changing m from -6 to 6, correlation factors H (-6), H(-5), . . . , H(6) shown in FIG. 15B are calculated from the equation (1). A distance to a subject is given a preset value (position) for a minimum correlation factor of H(0). If a correlation factor becomes minimum at a position different from the preset position, a distance to the subject can be detected from this displacement amount (phase difference from m=0).
Light receiving elements of the base and reference line sensors 55 and 56 are arranged in line by a pitch of, for example, 20 .mu.m. In this case, a correlation factor is calculated at each discrete position corresponding to a 20 .mu.m pitch on an image plane. If a subject is at an intermediate position between two discrete positions, correlation factors on the right side of the extreme become different from correlation factors on the left side as shown by broken lines in FIG. 15B. In such as case, a resolution better than the pitch on an image plane can be obtained by interpolation calculation.
FIG. 15C is a schematic diagram explaining three-point interpolation.
A position with a minimum correlation factor is represented by x2, and sample points on both sides of x2 are represented by x1 and x3. Calculated correlation factors are indicated by solid circles. In the example shown in FIG. 15C, the correlation factor y3 at the position x3 is lower than the correlation factor y1. In this case, a true minimum value exists at the position slightly away from the position x2 and toward the position x3. If the extreme is correct at the position x2, the correlation factor line is folded at the position x2 as indicated by a broken line f1. Assuming that the correlation factor line rises symmetrically from the position x2, the correlation factor y3a at the position x3 becomes equal to the correlation factor y1 at the position x1. If a true minimum value exists at the middle point between the positions x2 and x3, the correlation factor line is folded at the middle point as indicated by a broken line f2, and the correlation factor y2 at the position x2 becomes equal to the correlation factor y3b at the position x3. A difference (y3a-y3b) between two correlation factors at the position x3 is equal to a difference (y1-y2) between two correlation factors at the positions x1 and x2. That is, a half pitch displacement of the minimum produces a change in the correlation factor corresponding to one pitch. The position with a true minimum correlation factor can be obtained by checking at what position between the aforementioned two cases the calculated correlation factor exists. A displacement amount d from the position x2 is given by: EQU d=(y1-y3)/2(y1-y2)
A conventional rangefinder detects a single most probable distance even if there is a plurality of subjects in a predetermined rangefinding area. If two or more subjects are present at different distances in the rangefinding area, it is desirable that distances as many as the number of subjects can be detected.
A conventional rangefinder outputs only one distance value from a plurality of measured distances of a plurality of subjects by selecting a median thereof. This value is not highly reliable.